﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="d0.ascx.cs" Inherits="hcms.Templates.d0" %>
<div class="pageheader" onmouseover="$('.announcement marquee')[0].stop();"  onmouseout="$('.announcement marquee')[0].start();">







<div class="bdsharebuttonbox">
<a class="bds_more" href="#" data-cmd="more"></a>
<a class="bds_qzone" href="#" data-cmd="qzone"></a>
<a class="bds_tsina" href="#" data-cmd="tsina"></a>
<a class="bds_tqq" href="#" data-cmd="tqq"></a>
<a class="bds_renren" href="#" data-cmd="renren"></a>
<a class="bds_weixin" href="#" data-cmd="weixin"></a>

</div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdPic":"","bdStyle":"0","bdSize":"16"},"share":{},"image":{"viewList":["qzone","tsina","tqq","renren","t163"],"viewText":"分享到：","viewSize":"16"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","t163"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=86835285.js?cdnversion='+~(-new Date()/36e5)];</script>













<div id="iduserinfo">
  <div class="userlogined">
		<span id="idusername" onclick="window.location='/admin'"></span>&nbsp;&nbsp;<a href="javascript:logout()">注销</a>&nbsp;&nbsp;<a href="/">首页</a>
  </div>
  <div class="userinlogin">
		用户名 <input id="inpusername" type="text" SCROLLDELAY="5000" />&nbsp;&nbsp;
		密码 <input id="inppassword" type="password" />&nbsp;&nbsp;
		<a id="rightLoginBtn" href="javascript:fastLogin();">登录</a>&nbsp;&nbsp;<a href="javascript:showRegistration()">注册</a>&nbsp;&nbsp;<a href="/">首页</a>
  </div>
  <div class="userloading">User loading...&nbsp;&nbsp;<a href="/">首页</a></div>
</div>
<%-- 回车键直接登录 --%>
<script type="text/JavaScript">
	$("#inpusername, #inppassword").keypress(function (event) {
		if (event.keyCode == 13)
			fastLogin();
	})
</script>







	<%-- 主菜单 --%>
	<ul id="navmenu">
		<%
		StringBuilder str = new StringBuilder(100000);
		System.Data.DataRowCollection mainRows = model.getColumnsByTag("主菜单");
		foreach (System.Data.DataRow mainRow in mainRows)
		{
			str.AppendFormat("<li>{0}<ul>", mainRow["colName"]);
			System.Data.DataRowCollection columnRows = model.getColumnRows(mainRow["colID"].ToString(), false);
			if( columnRows.Count > 0 )
			{
				// 栏目下拉项
				foreach (System.Data.DataRow columnRow in columnRows)
				{
					str.AppendFormat("<li onclick='window.location=\"/ColumnList.aspx?cid={0}\"' title='{1}'>{1}</li>", columnRow["colID"], columnRow["colName"]);
				}
			}
			else
			{
				// 文档下拉项
				System.Data.DataRowCollection articleRows = model.getArticleRows(mainRow["colID"].ToString(), false);
				foreach (System.Data.DataRow articleRow in articleRows)
				{
					str.AppendFormat("<li onclick='window.location=\"/Articles/{0}-{1}.htm\"' title='{2}'>{2}</li>", articleRow["acidColumnID"], articleRow["artID"], articleRow["artTitle"]);
				}
			}
			str.AppendFormat("</ul></li>", mainRow["colName"]);
		// Response.Write(str); 可能在用户控件板块中不起作用
		}
		%>
<% = str %>
	</ul>
	<%-- 网站公告 --%>
	<div class="announcement">
		<marquee width="100%" direction="left" scrollamount="3" behavior="scroll">
		<%
		str.Length = 0;
		System.Data.DataRowCollection promptRows = model.getArticleRows("005", false);
		for( int i = 0; i < 3 && i < promptRows.Count; i++ )
		{
			str.Append(promptRows[i]["artContent"]);
			str.Append("&nbsp;&nbsp;");
		}
		// Response.Write(str); 可能在用户控件板块中不起作用
	%>
<% = str %>
		</marquee>
	</div>

</div>
<script type="text/JavaScript">
	$("ul#navmenu li").hover(
		function () {
			$(this).addClass("hover");
		},
		function () {
			$(this).removeClass("hover");
		}
	);
</script>

